-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix AttributeError for Elasticsearch>2.0.0,<3.0.0 #197
base: master
Are you sure you want to change the base?
Conversation
AIOHttpConnection takes use_ssl argument and passes one to the parent's __init__. Then self.use_ssl gets used instead of use_ssl here https://github.com/aio-libs/aioelasticsearch/blob/master/aioelasticsearch/connection.py#L52 It works for the latest elasticsearch-py versions, however, it doesn't work with >2.0.0, b/c there's no self.use_ssl = use_ssl there.
Codecov Report
@@ Coverage Diff @@
## master #197 +/- ##
======================================
Coverage 0.23% 0.23%
======================================
Files 6 6
Lines 433 433
Branches 77 77
======================================
Hits 1 1
Misses 432 432
Continue to review full report at Codecov.
|
Is elasticsearch 2.x supported still? |
@asvetlov I tested out As for |
Manual testing is not enough; the library should be tested by travis-ci against all supported ES versions. |
@asvetlov did you have a chance to take a look at the code itself? The update is very straightforward. I just substituted referred parent class's Connection property I'd even say it's quite reasonable and makes more sense, b/c there's no dependency on the underlying parent's implementation. Current tests are all good. So, I believe it's safe to merge one. |
Please don't get me wrong. You said that the PR fixes ES 2.x, that's awesome! |
AIOHttpConnection takes use_ssl argument and passes one to the parent's init.
Then self.use_ssl gets used instead of use_ssl here
https://github.com/aio-libs/aioelasticsearch/blob/master/aioelasticsearch/connection.py#L52
It works for the latest elasticsearch-py versions, however, it doesn't work with >2.0.0, b/c there's no self.use_ssl = use_ssl there.
What do these changes do?
Are there changes in behavior for the user?
Related issue number
Checklist
CHANGES
folder<issue_id>.<type>
(e.g.588.bugfix
)issue_id
change it to the pr id after creating the PR.feature
: Signifying a new feature..bugfix
: Signifying a bug fix..doc
: Signifying a documentation improvement..removal
: Signifying a deprecation or removal of public API..misc
: A ticket has been closed, but it is not of interest to users.Fix issue with non-ascii contents in doctest text files.